package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.CCustomersmsDao;
import com.xyz.domain.table.CCustomersms;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class CCustomersmsLogic {

    @Autowired
    private CCustomersmsDao cCustomersmsDao;

    public CCustomersms add(CCustomersms cCustomersms){
        return cCustomersmsDao.insert(cCustomersms);
    }

    public Integer update(CCustomersms cCustomersms){
        return cCustomersmsDao.update(cCustomersms);
    }

    public List<CCustomersms> list(CCustomersms cCustomersms, String orderBy){
        return cCustomersmsDao.selectList(cCustomersms, orderBy);
    }

    public Integer delete(Integer key){
        return cCustomersmsDao.delete(key);
    }

    public PageResponseModel<CCustomersms> pageInfo(CCustomersms cCustomersms, String orderBy, Integer pageNo, Integer pageSize){
        return cCustomersmsDao.selectByPageNo(cCustomersms, orderBy, pageNo, pageSize);
    }

    public Integer insertPhoneTodayInfo(CCustomersms customersms){
        return cCustomersmsDao.insertPhoneTodayInfo(customersms);
    }

}